<?php

namespace core\validate;

use think\Validate;

class ValidateBase extends Validate
{
    /**
     * 返回错误信息
     *
     * @param object $validateObj
     * @return string
     */
    public function getSimpleError(): string
    {
        if (is_string($this->getError())) {
            return $this->getError();
        }

        if (is_array($this->getError())) {

            return  implode('|', $this->getError());
        }
        return $this->getError();
    }
}
